{{template "common_header"}}
{{template "common_left" .}}
{{template "common_nav"}}
<div class="col-sm-12">
    <div class="panel">
        <div class="panel-content">
            <div class="table-responsive">
                <table class="table table-striped table-hover table-bordered text-center">
                    <thead>
                    <tr>
                        <th>ID</th>
						<th>任务名称</th>
						<th>执行时间</th>
                        <th>计划任务</th>
                        <th>状态</th>
                        <th></th>										
                    </tr>
                    </thead>
                    <tbody>
					{{- range .list}}
                    <tr>
                        <td>{{.ID}}</td>
                        <td>{{.Name}}</td>
						<td>{{.Spec}}</td>
						<td>{{.Job}}</td>                        
                        <td>{{- if eq .Status 1}}启动{{else}}停止{{- end}}</td>
                        <td>
                            <div class="btn-group">
								{{- if eq .Status 1}}
								<button class="btn btn-transparent btn-sm"><a href="/status?id={{.ID}}&tag=0">停止</a></button>
								{{else}}
								<button class="btn btn-transparent btn-sm"><a href="/status?id={{.ID}}&tag=1">启动</a></button>
								{{- end}}                                
                                <button class="btn btn-transparent btn-sm"><a class="color-danger" href="/delete?id={{.ID}}"><i class="fa fa-times"></i></a></button>
                            </div>
                        </td>
                    </tr>
					{{- end}}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
{{template "common_footer"}}				